﻿using CoreEx.Common.Logging;
namespace CoreEx.Common.Implementation.Logging
{
    /// <summary>
    /// Creates a <see cref="TraceLogAdapter"/> instance 
    /// if no other <see cref="LoggerFactoryBase"/> implementations exists.
    /// </summary>
    public class TraceDebugLoggerFactory : LoggerFactoryBase
    {
        /// <summary>
        /// Creates a <see cref="ILogger"/> instance
        /// </summary>
        /// <param name="name">The name of the logger</param>
        /// <returns><see cref="ILogger"/></returns>
        protected override ILogger CreateLogger(string name)
        {
            return new TraceLogAdapter();
        }
    }
}
